<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: log/config.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9381a7bbd03577d6d8720c7f35c94ffa.html">log</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">config.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="config_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/* Flow</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2023 Akamai Technologies, Inc.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * &quot;License&quot;); you may not use this file except in</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * compliance with the License.  You may obtain a copy</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * of the License at</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> *</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> *   https://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> *</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"> * Unless required by applicable law or agreed to in</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment"> * writing, software distributed under the License is</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment"> * distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> * CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> * See the License for the specific language governing</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * permissions and limitations under the License. */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"></span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">/// @file</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"></span><span class="preprocessor">#include &quot;<a class="code" href="config_8hpp.html">flow/log/config.hpp</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#include &lt;boost/algorithm/string.hpp&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceflow_1_1log.html">flow::log</a></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment">// Static initializations.</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">// By definition INFO is the most-verbose severity meant to avoid affecting performance.</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="keyword">const</span> <a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a94e6c81a4e3dd9b41c1b468f7d7c1a90">Config::S_MOST_VERBOSE_SEV_DEFAULT</a> = <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04ac238793326fae17afcc849e96b96e8e7">Sev::S_INFO</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="comment">// Implementations.</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#a20ba1556441155d7086282f76d051f61">   31</a></span><a class="code hl_function" href="classflow_1_1log_1_1Config.html#a20ba1556441155d7086282f76d051f61">Config::Config</a>(<a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> most_verbose_sev_default) :</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>  m_use_human_friendly_time_stamps(true),</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>  m_verbosity_default(static_cast&lt;<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>&gt;(most_verbose_sev_default))</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>{</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>  <span class="comment">// Nothing.</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>}</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><a class="code hl_function" href="classflow_1_1log_1_1Config.html#a20ba1556441155d7086282f76d051f61">Config::Config</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Config.html">Config</a>&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#af2d963a6e1e9e0fc5809764d5718e938">   40</a></span><a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">Config::component_union_idx_t</a> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#af2d963a6e1e9e0fc5809764d5718e938">Config::component_to_union_idx</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; component)<span class="keyword"> const</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>  <span class="comment">/* Caution!  This is called by output_whether_should_log() which is potentially called in *every* log call site</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="comment">   * including ones for which output_whether_should_log() == Logger::should_log() will yields false.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="comment">   * Keep this code -- including .lookup() insides -- tight and performant, more-so than almost anyplace else! */</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>  <span class="comment">// Use sentinel -1 to track lookup() failure instead of lookup() retval.  Might speed things up a tiny bit.</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>  <a class="code hl_struct" href="structflow_1_1log_1_1Config_1_1Component__config.html">Component_config</a> component_cfg{<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a>(-1)};</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>  <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#ae447f7751eb63baefb04fdeeeff95fda">m_component_cfgs_by_payload_type</a>.<a class="code hl_function" href="classflow_1_1log_1_1Component__payload__type__dict.html#afcb470076f57f851f8fff1d0322e5f66">lookup</a>(component.<a class="code hl_function" href="classflow_1_1log_1_1Component.html#a3ff8ff4d75add447b3e10ded5430833d">payload_type</a>(), &amp;component_cfg);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>  <span class="comment">// BTW, as of this writing, that asserts !component.empty() (non-null Component), as advertised (undefined behavior).</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>  <span class="keywordflow">if</span> (component_cfg.m_enum_to_num_offset != <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a>(-1))</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>  {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    component_cfg.m_enum_to_num_offset += component.<a class="code hl_function" href="classflow_1_1log_1_1Component.html#a899a7d2b0c5daa8e4d666d431b9bf48e">payload_enum_raw_value</a>();</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>    <span class="comment">// Note: Result is not -1 (both addends are non-negative).</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>  }</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>  <span class="comment">// else if (m_enum_to_num_offset == -1) { As advertised, this is an allowed eventuality: return -1. }</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>  <span class="keywordflow">return</span> component_cfg.m_enum_to_num_offset;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>}</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#aee6877cec4b070e18a40090f080e76ca">   62</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#aee6877cec4b070e18a40090f080e76ca">Config::store_severity_by_component</a>(<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a> component_union_idx, <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a> most_verbose_sev_or_none)</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>{</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>  <span class="keyword">using </span>std::memory_order_relaxed;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>  <span class="comment">/* This is explicitly disallowed in our contract.  See doc header for m_verbosities_by_component for brief</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="comment">   * discussion of why this is disallowed, but it&#39;s allowed in output_whether_should_log(). */</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>  assert(component_union_idx != <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a>(-1));</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>  assert(component_union_idx &lt; <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f">m_verbosities_by_component</a>.size());</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>  <span class="comment">/* Store the severity, encoded as a byte for compactness and such.  Please read doc header for</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="comment">   * Component_union_idx_to_sev_map at this point then come back here.</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span><span class="comment">   * As noted there, the lookup by index is safe against concurrent output_whether_should_log() doing the same,</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="comment">   * because by the time either we or output_whether_should_log() are called, init_component_to_union_idx_mapping()</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span><span class="comment">   * calls are required to have been all completed for perpetuity.</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="comment">   * That brings us to the actual assignment to the atomic.  Firstly, we could have used just a regular-looking</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="comment">   * =assignment.  However that actually means basically .store(..., memory_order_seq_cst) which has spectacular</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="comment">   * thread safety (total coherence across cores, and of course atomicity) -- but it is expensive.  Granted, we don&#39;t</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="comment">   * care about *our* performance that much, but we highly care about output_whether_should_log()&#39;s; and unless that</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="comment">   * one also uses memory_order_seq_cst (via = or otherwise) we don&#39;t really reap the benefit.  So, we use</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span><span class="comment">   * memory_order_relaxed in both places.  Its performance is the highest possible for an atomic&lt;&gt;, which in fact for</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="comment">   * x86 means it is no worse than an assignment of a *non*-atomic (in fact the more stringent memory_order_release</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span><span class="comment">   * would, on x86, been perf-equivalent to a non-atomic assignment -- and this is faster or the same by definition).</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="comment">   * Basically memory_order_relaxed guarantees atomicity (so it is not corrupted, formally) and not much more.</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="comment">   * So the only question remains: is the multi-thread behavior of this acceptable for our purposes?</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="comment">   *</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span><span class="comment">   * To tackle this, consider the actual scenario.  What&#39;s at stake?  Simple: The Sev is set to X before our call</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="comment">   * and Y after; the change from X to Y would cause message M to pass the output_whether_should_log() filter</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="comment">   * before but not after the change, or vice versa.  So by executing this store() op, do we get this desired effect?</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="comment">   * Consider that we are called in thread 1, and there are other threads; take thread 2 as an example.</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span><span class="comment">   *   - Thread 1: If M is logged in this thread, then either that occurs strictly before this call or strictly after.</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="comment">   *     Even a regular assignment, no atomics involved, works in that scenario.  So this store() certainly does also.</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span><span class="comment">   *     No problem.</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="comment">   *   - Thread 2: If M is logged in thread 2, then there is potential controversy.  The store() is atomic, but there</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span><span class="comment">   *     is no guarantee that it will reflect immediately (for some definition of immediately) in thread 2; thread 2</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="comment">   *     could have loaded X into a register already and may use it strictly after in memory it has changed to Y,</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="comment">   *     so to thread 2&#39;s C++ code the change to Y is not &quot;visible&quot; yet.  However, this does not matter in practice.</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="comment">   *     It just means it will act as if M were logged a split second earlier and thus with verbosity X and not Y</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span><span class="comment">   *     anyway.  Very shortly the side effect of the assignment will propagate to be visible on every core, registers</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="comment">   *     and caching notwithstanding.  Now thread 2 will operate according to severity Y.  No problem.</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span><span class="comment">   *</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span><span class="comment">   * As you can see in atomic&lt;&gt; docs, memory_order_relaxed guarantees atomicity and read-write coherence (a/k/a sanity)</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="comment">   * but performs no synchronization, meaning other memory writes that happen before may be reordered to after and</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span><span class="comment">   * vice versa; but we absolutely do not care about that.  Even just conceivably we could only care about other</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span><span class="comment">   * components&#39; severities, and we make no promise that output_whether_should_log() will expect to work with some sort</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span><span class="comment">   * of batch-atomic multi-component verbosity update.  So we are fine.</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span><span class="comment">   *</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span><span class="comment">   * What about `configure_component_verbosity*()` in thread 1 vs. same method in thread 2, concurrently?</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span><span class="comment">   * Well, that&#39;s just a race.  Both are atomic, so either one or the other &quot;wins&quot; and will be propagated to be</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span><span class="comment">   * visible by all threads soon enough.  I add that we explicitly say concurrent such calls are allowed and are safe,</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span><span class="comment">   * but in practical terms it&#39;s ill-advised to have your program change config concurrently from multiple threads;</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span><span class="comment">   * there is unlikely to be a good design that would do this. */</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>  <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f">m_verbosities_by_component</a>[<span class="keywordtype">size_t</span>{component_union_idx}].store(most_verbose_sev_or_none, memory_order_relaxed);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>} <span class="comment">// Config::store_severity_by_component()</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#ac562cc0132f6cfa81b42c332400033ae">  116</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#ac562cc0132f6cfa81b42c332400033ae">Config::configure_default_verbosity</a>(<a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> most_verbose_sev, <span class="keywordtype">bool</span> reset)</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>{</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>  <span class="keyword">using </span>std::memory_order_relaxed;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>  <span class="comment">// Straightforward (except see discussion on atomic assignment in store_severity_by_component(); applies here).</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>  <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c">m_verbosity_default</a>.store(<span class="keyword">static_cast&lt;</span><a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a><span class="keyword">&gt;</span>(most_verbose_sev), memory_order_relaxed);</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>  <span class="keywordflow">if</span> (reset)</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>  {</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>    <span class="keywordflow">for</span> (<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a> component_union_idx = 0;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>         <span class="keywordtype">size_t</span>{component_union_idx} != <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f">m_verbosities_by_component</a>.size();</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>         ++component_union_idx)</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>      <a class="code hl_function" href="classflow_1_1log_1_1Config.html#aee6877cec4b070e18a40090f080e76ca">store_severity_by_component</a>(component_union_idx, <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>(-1));</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>    }</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>  }</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>}</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#a2f266ee7e22d1090ab4de76e532cab89">  134</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#a2f266ee7e22d1090ab4de76e532cab89">Config::configure_component_verbosity_by_name</a>(<a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> most_verbose_sev,</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>                                                   <a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">util::String_view</a> component_name_unnormalized)</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>{</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>  <span class="keyword">const</span> <span class="keyword">auto</span> component_name = <a class="code hl_function" href="classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de">normalized_component_name</a>(component_name_unnormalized);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>  <span class="keyword">const</span> <span class="keyword">auto</span> component_union_idx_it = <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#ad9decea94f2d3297a2b24bc6de7c4657">m_component_union_idxs_by_name</a>.find(component_name);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>  <span class="keywordflow">if</span> (component_union_idx_it == <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#ad9decea94f2d3297a2b24bc6de7c4657">m_component_union_idxs_by_name</a>.end())</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>  {</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>  }</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>  <span class="keyword">const</span> <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a> component_union_idx = component_union_idx_it-&gt;second;</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>  assert(component_union_idx != <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a>(-1)); <span class="comment">// We don&#39;t save `-1`s.  This is our bug if it happens.</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span> </div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>  <a class="code hl_function" href="classflow_1_1log_1_1Config.html#aee6877cec4b070e18a40090f080e76ca">store_severity_by_component</a>(component_union_idx, <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>(most_verbose_sev));</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>} <span class="comment">// Config::configure_component_verbosity_by_name()</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#a6376bf2af57f655c1cdf00791e6a2f7f">  152</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#a6376bf2af57f655c1cdf00791e6a2f7f">Config::output_component_to_ostream</a>(std::ostream* os_ptr, <span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; component)<span class="keyword"> const</span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>  assert(os_ptr);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>  <span class="keyword">auto</span>&amp; os = *os_ptr;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>  <span class="keywordflow">if</span> (component.<a class="code hl_function" href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">empty</a>()) <span class="comment">// Unspecified component at log call site (or wherever).</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>  {</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    <span class="comment">// Same as if unregistered component: do not show one.</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>  }</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>  <span class="keyword">const</span> <span class="keyword">auto</span> component_union_idx = <a class="code hl_function" href="classflow_1_1log_1_1Config.html#af2d963a6e1e9e0fc5809764d5718e938">component_to_union_idx</a>(component);</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>  <span class="keywordflow">if</span> (component_union_idx == <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a>(-1))</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>  {</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// Unregistered component.payload_type().</span></div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>  }</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>  <span class="keyword">const</span> <span class="keyword">auto</span> component_name_it = <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a35cb8f5805d2093d13625a528d78919c">m_component_names_by_union_idx</a>.find(component_union_idx);</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>  <span class="keywordflow">if</span> (component_name_it == <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a35cb8f5805d2093d13625a528d78919c">m_component_names_by_union_idx</a>.end())</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>  {</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    os &lt;&lt; component_union_idx; <span class="comment">// Unknown name; or intentionally not saved, b/c they preferred numeric output.</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>  }</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>  <span class="keywordflow">else</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>  {</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>    <span class="keyword">auto</span>&amp; name = component_name_it-&gt;second;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>    assert(!name.empty());</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>    os &lt;&lt; name;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>  }</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>} <span class="comment">// Config::output_component_to_ostream()</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#ae429a329e31a41ba75f94578b0e7f26c">  184</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#ae429a329e31a41ba75f94578b0e7f26c">Config::output_whether_should_log</a>(<a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> sev, <span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; component)<span class="keyword"> const</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>  <span class="keyword">using </span>std::memory_order_relaxed;</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>  <span class="comment">// See doc header for contract please; then come back here.</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span> </div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>  <span class="comment">// Check possible thread-local override in which case it&#39;s a very quick filter check.</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>  <span class="keyword">const</span> <span class="keyword">auto</span> sev_override = *(<a class="code hl_function" href="classflow_1_1log_1_1Config.html#a81da2c80d99cdd43c66a0df2eed64c70">this_thread_verbosity_override</a>());</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>  <span class="keywordflow">if</span> (sev_override != <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf">Sev::S_END_SENTINEL</a>)</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>  {</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>    <span class="keywordflow">return</span> sev &lt;= sev_override;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span>  }</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span>  <span class="comment">// else: Must actually check the config in `*this`.  Concurrency is a factor from this point forward.</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>  <span class="comment">// See doc header for Component_union_idx_to_sev_map; then come back here.</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>  <span class="keywordflow">if</span> (!component.<a class="code hl_function" href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">empty</a>())</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span>  {</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>    <span class="keyword">const</span> <span class="keyword">auto</span> component_union_idx = <a class="code hl_function" href="classflow_1_1log_1_1Config.html#af2d963a6e1e9e0fc5809764d5718e938">component_to_union_idx</a>(component);</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>    <span class="keywordflow">if</span> (component_union_idx != <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">component_union_idx_t</a>(-1))</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>    {</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>      <span class="comment">/* There are a few things going on here.</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span><span class="comment">       *   - If m_verbosities_by_component[component_union_idx] == -1, then by m_verbosities_by_component semantics</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span><span class="comment">       *     (see its doc header) that means it&#39;s not a key in the conceptual map, so no severity configured for</span></div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span><span class="comment">       *     component: fall through to check of m_verbosity_default.</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span><span class="comment">       *   - If component_union_idx is out of bounds, we promised in our contract and in doc header for</span></div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span><span class="comment">       *     m_verbosities_by_component to treat it the same (in this context) as if it were -1 (not in the &quot;map&quot;).</span></div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span><span class="comment">       *     The rationale for not crashing instead is briefly discussed in m_verbosities_by_component doc header,</span></div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span><span class="comment">       *     including why in store_severity_by_component() it is disallowed (crashes).</span></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span><span class="comment">       *   - If m_verbosities_by_component[component_union_idx] != -1, then yay, that&#39;s the severity configured for</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span><span class="comment">       *     component.  Read it from the atomic with memory_order_relaxed; the full reasoning is discussed in the</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span><span class="comment">       *     write site, store_severity_by_component(); we just follow that strategy here. */</span></div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>      <span class="keyword">const</span> <span class="keyword">auto</span> most_verbose_sev_raw</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>        = (component_union_idx &lt; <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f">m_verbosities_by_component</a>.size())</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>            ? <a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f">m_verbosities_by_component</a>[component_union_idx].load(memory_order_relaxed) <span class="comment">// Might be -1 still.</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>            : <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>(-1);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span> </div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>      <span class="keywordflow">if</span> (most_verbose_sev_raw != <a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>(-1))</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span>      {</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>        <span class="keywordflow">return</span> sev &lt;= <a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a>{most_verbose_sev_raw};</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>      }</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>      <span class="comment">// else { Fall through.  Out of bounds, or -1. }</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>    }</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>    <span class="comment">// else { component.payload()&#39;s enum wasn&#39;t registered.  Fall through. }</span></div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>  }</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span>  <span class="comment">// else if (component.empty()) { No component, so cannot look it up.  Fall through. }</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span> </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span>  <span class="comment">/* Fell through here: no component specified; or enum wasn&#39;t registered, so none</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span><span class="comment">   * of the values therein is in the verbosity table; or the particular enum value doesn&#39;t have an individual</span></div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span><span class="comment">   * verbosty in the table.  In all cases the default catch-all verbosity therefore applies. */</span></div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>  <span class="comment">// Use the same atomic read technique as in the verbosity table for the identical reasons.</span></div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>  <span class="keywordflow">return</span> sev &lt;= <a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a>{<a class="code hl_variable" href="classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c">m_verbosity_default</a>.load(memory_order_relaxed)};</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>} <span class="comment">// Config::output_whether_should_log()</span></div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de">  240</a></span>std::string <a class="code hl_function" href="classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de">Config::normalized_component_name</a>(<a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">util::String_view</a> name) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>{</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>  <span class="keyword">using </span>boost::algorithm::to_upper_copy;</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>  <span class="keyword">using </span>std::locale;</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span>  <span class="keyword">using </span>std::string;</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span> </div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>  <span class="keywordflow">return</span> to_upper_copy(<span class="keywordtype">string</span>{name}, locale::classic());</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>}</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span> </div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#a2a7be5337621d131ef084ba69ad95f1b">  249</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#a2a7be5337621d131ef084ba69ad95f1b">Config::normalize_component_name</a>(std::string* name) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span>{</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span>  <span class="keyword">using </span>boost::algorithm::to_upper;</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span>  <span class="keyword">using </span>std::locale;</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span> </div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>  to_upper(*name, locale::classic());</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>}</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span> </div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#a81da2c80d99cdd43c66a0df2eed64c70">  257</a></span><a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a>* <a class="code hl_function" href="classflow_1_1log_1_1Config.html#a81da2c80d99cdd43c66a0df2eed64c70">Config::this_thread_verbosity_override</a>() <span class="comment">// Static.</span></div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>{</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span>  <span class="keyword">thread_local</span> <a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> verbosity_override = <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf">Sev::S_END_SENTINEL</a>; <span class="comment">// Initialized 1st time through this line in this thread.</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>  <span class="keywordflow">return</span> &amp;verbosity_override;</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>  <span class="comment">/* Also considered using boost::thread_specific_ptr&lt;Sev&gt; and/or making it a class-static member/file-static variable.</span></div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span><span class="comment">   * But this seems like it has the highest chance to be optimized to the max, being as local as possible and skipping</span></div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span><span class="comment">   * any library (like Boost) that could add overhead with user-space associative lookups.  Details omitted. */</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span>}</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span> </div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config.html#ab025990297cc07d51aaec277af203dfe">  267</a></span><a class="code hl_class" href="classflow_1_1util_1_1Scoped__setter.html">util::Scoped_setter&lt;Sev&gt;</a> <a class="code hl_function" href="classflow_1_1log_1_1Config.html#ab025990297cc07d51aaec277af203dfe">Config::this_thread_verbosity_override_auto</a>(<a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> most_verbose_sev_or_none) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span>{</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span>  <span class="comment">/* Return this RAII thingie that&#39;ll immediately set *P and in dtor restore *P, where P is the pointer to thread-local</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span><span class="comment">   * storage as returned by this_thread_verbosity_override(). */</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span>  <span class="keywordflow">return</span> <a class="code hl_class" href="classflow_1_1util_1_1Scoped__setter.html">util::Scoped_setter&lt;Sev&gt;</a>{<a class="code hl_function" href="classflow_1_1log_1_1Config.html#a81da2c80d99cdd43c66a0df2eed64c70">this_thread_verbosity_override</a>(), std::move(most_verbose_sev_or_none)};</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>}</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span> </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html#a0edf54321d64532405b9786dd707e026">  274</a></span><a class="code hl_function" href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html#a0edf54321d64532405b9786dd707e026">Config::Atomic_raw_sev::Atomic_raw_sev</a>(<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a> init_val) :</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>  std::atomic&lt;<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>&gt;(init_val)</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>{</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span>  <span class="comment">// Nothing more.</span></div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span>}</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span> </div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html#a698747fabbaff0c6083b61e064e39e77">  280</a></span><a class="code hl_function" href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html#a0edf54321d64532405b9786dd707e026">Config::Atomic_raw_sev::Atomic_raw_sev</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html">Atomic_raw_sev</a>&amp; src) :</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span>  std::atomic&lt;<a class="code hl_typedef" href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">raw_sev_t</a>&gt;(src.load(std::memory_order_relaxed))</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span>{</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>  <span class="comment">/* Note the way we implement the copy construction via load(relaxed); this is why surprising stuff can technically</span></div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span><span class="comment">   * happen if src&#39;s contents haven&#39;t propagated to this thread yet.  As of this writing the 2 call sites are</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span><span class="comment">   * in the Config::Config(Config)=default (copy ctor); and in init_component_to_union_idx_mapping() when the resize()</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span><span class="comment">   * makes copies of a default-constructed Atomic_raw_sev(-1).  In the latter scenario we&#39;re guaranteed to call</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span><span class="comment">   * this in the same thread as the default-construction.  In the former scenario we warn the user in the doc header</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span><span class="comment">   * about the possibility.  If the call sites change after this writing, the spirit should stand fast, I think. */</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span>}</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span> </div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span>} <span class="comment">// namespace flow::log</span></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component__payload__type__dict_html_afcb470076f57f851f8fff1d0322e5f66"><div class="ttname"><a href="classflow_1_1log_1_1Component__payload__type__dict.html#afcb470076f57f851f8fff1d0322e5f66">flow::log::Component_payload_type_dict::lookup</a></div><div class="ttdeci">bool lookup(const std::type_info &amp;type, Cfg *cfg) const</div><div class="ttdoc">Looks up a value previously added via insert(), or indicates no such value has yet been added.</div><div class="ttdef"><b>Definition:</b> <a href="component__cfg_8hpp_source.html#l00722">component_cfg.hpp:722</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html"><div class="ttname"><a href="classflow_1_1log_1_1Component.html">flow::log::Component</a></div><div class="ttdoc">A light-weight class, each object storing a component payload encoding an enum value from enum type o...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00839">log.hpp:840</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a3ff8ff4d75add447b3e10ded5430833d"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a3ff8ff4d75add447b3e10ded5430833d">flow::log::Component::payload_type</a></div><div class="ttdeci">const std::type_info &amp; payload_type() const</div><div class="ttdoc">Returns typeid(Payload), where Payload was the template param used when calling the originating one-a...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00174">log.cpp:174</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a5af2f66731c407bd519a873706bd04c4"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">flow::log::Component::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">Returns true if *this is as if default-constructed (a null Component); false if as if constructed via...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00169">log.cpp:169</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a899a7d2b0c5daa8e4d666d431b9bf48e"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a899a7d2b0c5daa8e4d666d431b9bf48e">flow::log::Component::payload_enum_raw_value</a></div><div class="ttdeci">enum_raw_t payload_enum_raw_value() const</div><div class="ttdoc">Returns the numeric value of the enum payload stored by this Component, originating in the one-arg co...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00180">log.cpp:180</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_1_1Atomic__raw__sev_html"><div class="ttname"><a href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html">flow::log::Config::Atomic_raw_sev</a></div><div class="ttdoc">Trivial wrapper of atomic&lt;raw_sev_t&gt; which adds a couple of things to make it possible to construct,...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l00882">config.hpp:883</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_1_1Atomic__raw__sev_html_a0edf54321d64532405b9786dd707e026"><div class="ttname"><a href="classflow_1_1log_1_1Config_1_1Atomic__raw__sev.html#a0edf54321d64532405b9786dd707e026">flow::log::Config::Atomic_raw_sev::Atomic_raw_sev</a></div><div class="ttdeci">Atomic_raw_sev(raw_sev_t init_val=raw_sev_t(-1))</div><div class="ttdoc">Constructs the atomic to the given value, guaranteed to be load()ed as such in all subsequent accesse...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00274">config.cpp:274</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html"><div class="ttname"><a href="classflow_1_1log_1_1Config.html">flow::log::Config</a></div><div class="ttdoc">Class used to configure the filtering and logging behavior of Loggers; its use in your custom Loggers...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l00316">config.hpp:317</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a20ba1556441155d7086282f76d051f61"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a20ba1556441155d7086282f76d051f61">flow::log::Config::Config</a></div><div class="ttdeci">Config(Sev most_verbose_sev_default=S_MOST_VERBOSE_SEV_DEFAULT)</div><div class="ttdoc">Constructs a conceptually blank but functional set of Config.</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00031">config.cpp:31</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a2a7be5337621d131ef084ba69ad95f1b"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a2a7be5337621d131ef084ba69ad95f1b">flow::log::Config::normalize_component_name</a></div><div class="ttdeci">static void normalize_component_name(std::string *name)</div><div class="ttdoc">Normalizes given component name in place.</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00249">config.cpp:249</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a2f266ee7e22d1090ab4de76e532cab89"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a2f266ee7e22d1090ab4de76e532cab89">flow::log::Config::configure_component_verbosity_by_name</a></div><div class="ttdeci">bool configure_component_verbosity_by_name(Sev most_verbose_sev, util::String_view component_name)</div><div class="ttdoc">Like configure_component_verbosity(), but the component is to be specified by its registered string n...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00134">config.cpp:134</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a35cb8f5805d2093d13625a528d78919c"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a35cb8f5805d2093d13625a528d78919c">flow::log::Config::m_component_names_by_union_idx</a></div><div class="ttdeci">Component_union_idx_to_name_map m_component_names_by_union_idx</div><div class="ttdoc">Maps each flat union component index to its output component name as registered in init_component_nam...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l01088">config.hpp:1088</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a409818a2192ee2544b442b2ea957a76c"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a409818a2192ee2544b442b2ea957a76c">flow::log::Config::m_verbosity_default</a></div><div class="ttdeci">Atomic_raw_sev m_verbosity_default</div><div class="ttdoc">Most verbose (highest) log::Sev for which output_whether_should_log() will return true,...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l01049">config.hpp:1049</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a428c0ae690c951c1667e24afb6ef43de"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a428c0ae690c951c1667e24afb6ef43de">flow::log::Config::normalized_component_name</a></div><div class="ttdeci">static std::string normalized_component_name(util::String_view name)</div><div class="ttdoc">Normalized version of given component name.</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00240">config.cpp:240</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a6376bf2af57f655c1cdf00791e6a2f7f"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a6376bf2af57f655c1cdf00791e6a2f7f">flow::log::Config::output_component_to_ostream</a></div><div class="ttdeci">bool output_component_to_ostream(std::ostream *os, const Component &amp;component) const</div><div class="ttdoc">An output of Config, this writes a string representation of the given component value to the given os...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00152">config.cpp:152</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a6b6b4511883c815e81f6427909ed829f"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a6b6b4511883c815e81f6427909ed829f">flow::log::Config::m_verbosities_by_component</a></div><div class="ttdeci">Component_union_idx_to_sev_map m_verbosities_by_component</div><div class="ttdoc">Maps from flat union component index to most verbose (highest) log::Sev for which output_whether_shou...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l01078">config.hpp:1078</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a81da2c80d99cdd43c66a0df2eed64c70"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a81da2c80d99cdd43c66a0df2eed64c70">flow::log::Config::this_thread_verbosity_override</a></div><div class="ttdeci">static Sev * this_thread_verbosity_override()</div><div class="ttdoc">Returns pointer to this thread's mutable verbosity override, for querying or assignment alike.</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00257">config.cpp:257</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_a94e6c81a4e3dd9b41c1b468f7d7c1a90"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#a94e6c81a4e3dd9b41c1b468f7d7c1a90">flow::log::Config::S_MOST_VERBOSE_SEV_DEFAULT</a></div><div class="ttdeci">static const Sev S_MOST_VERBOSE_SEV_DEFAULT</div><div class="ttdoc">Recommended default/catch-all most-verbose-severity value if no specific config is given.</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l00330">config.hpp:330</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_aabb6bf7c67b40faeab764ad695b63b9d"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#aabb6bf7c67b40faeab764ad695b63b9d">flow::log::Config::component_union_idx_t</a></div><div class="ttdeci">Component::enum_raw_t component_union_idx_t</div><div class="ttdoc">Unsigned index into the flat union of component tables maintained by a Config, combining potentially ...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l00325">config.hpp:325</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_ab025990297cc07d51aaec277af203dfe"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#ab025990297cc07d51aaec277af203dfe">flow::log::Config::this_thread_verbosity_override_auto</a></div><div class="ttdeci">static util::Scoped_setter&lt; Sev &gt; this_thread_verbosity_override_auto(Sev most_verbose_sev_or_none)</div><div class="ttdoc">Sets *(this_thread_verbosity_override()) = most_verbose_sev_or_none; and returns an object that shall...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00267">config.cpp:267</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_ac562cc0132f6cfa81b42c332400033ae"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#ac562cc0132f6cfa81b42c332400033ae">flow::log::Config::configure_default_verbosity</a></div><div class="ttdeci">void configure_default_verbosity(Sev most_verbose_sev_default, bool reset)</div><div class="ttdoc">Sets the default verbosity to the given value, to be used by subsequent output_whether_should_log() c...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00116">config.cpp:116</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_acae76e3367bd497f5b00f46e48b3a39c"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#acae76e3367bd497f5b00f46e48b3a39c">flow::log::Config::raw_sev_t</a></div><div class="ttdeci">uint8_t raw_sev_t</div><div class="ttdoc">How we store a log::Sev (a mere enum itself) in a certain data structure.</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l00859">config.hpp:859</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_ad9decea94f2d3297a2b24bc6de7c4657"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#ad9decea94f2d3297a2b24bc6de7c4657">flow::log::Config::m_component_union_idxs_by_name</a></div><div class="ttdeci">Component_name_to_union_idx_map m_component_union_idxs_by_name</div><div class="ttdoc">Maps each distinct component name as registered in init_component_names() to its flat union component...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l01095">config.hpp:1095</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_ae429a329e31a41ba75f94578b0e7f26c"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#ae429a329e31a41ba75f94578b0e7f26c">flow::log::Config::output_whether_should_log</a></div><div class="ttdeci">bool output_whether_should_log(Sev sev, const Component &amp;component) const</div><div class="ttdoc">A key output of Config, this computes the verbosity-filtering answer to Logger::should_log() based on...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00184">config.cpp:184</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_ae447f7751eb63baefb04fdeeeff95fda"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#ae447f7751eb63baefb04fdeeeff95fda">flow::log::Config::m_component_cfgs_by_payload_type</a></div><div class="ttdeci">Component_payload_type_to_cfg_map m_component_cfgs_by_payload_type</div><div class="ttdoc">Fast-lookup map from distinct Component_payload type to the config for that component enum.</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l01034">config.hpp:1034</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_aee6877cec4b070e18a40090f080e76ca"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#aee6877cec4b070e18a40090f080e76ca">flow::log::Config::store_severity_by_component</a></div><div class="ttdeci">void store_severity_by_component(component_union_idx_t component_union_idx, raw_sev_t most_verbose_sev_or_none)</div><div class="ttdoc">Helper that for the given flat-union-component-index saves the given per-component verbosity,...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00062">config.cpp:62</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Config_html_af2d963a6e1e9e0fc5809764d5718e938"><div class="ttname"><a href="classflow_1_1log_1_1Config.html#af2d963a6e1e9e0fc5809764d5718e938">flow::log::Config::component_to_union_idx</a></div><div class="ttdeci">component_union_idx_t component_to_union_idx(const Component &amp;component) const</div><div class="ttdoc">Given a component in the form user provides it at log call sites, returns its index in the flat compo...</div><div class="ttdef"><b>Definition:</b> <a href="config_8cpp_source.html#l00040">config.cpp:40</a></div></div>
<div class="ttc" id="aclassflow_1_1util_1_1Scoped__setter_html"><div class="ttname"><a href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a></div><div class="ttdoc">A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...</div><div class="ttdef"><b>Definition:</b> <a href="util_2util_8hpp_source.html#l00144">util.hpp:145</a></div></div>
<div class="ttc" id="aconfig_8hpp_html"><div class="ttname"><a href="config_8hpp.html">config.hpp</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html"><div class="ttname"><a href="namespaceflow_1_1log.html">flow::log</a></div><div class="ttdoc">Flow module providing logging functionality.</div><div class="ttdef"><b>Definition:</b> <a href="async__file__logger_8cpp_source.html#l00027">async_file_logger.cpp:28</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">flow::log::Sev</a></div><div class="ttdeci">Sev</div><div class="ttdoc">Enumeration containing one of several message severity levels, ordered from highest to lowest.</div><div class="ttdef"><b>Definition:</b> <a href="log__fwd_8hpp_source.html#l00223">log_fwd.hpp:224</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf">flow::log::Sev::S_END_SENTINEL</a></div><div class="ttdeci">@ S_END_SENTINEL</div><div class="ttdoc">Not an actual value but rather stores the highest numerical payload, useful for validity checks.</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04ac238793326fae17afcc849e96b96e8e7"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04ac238793326fae17afcc849e96b96e8e7">flow::log::Sev::S_INFO</a></div><div class="ttdeci">@ S_INFO</div><div class="ttdoc">Message indicates a not-&quot;bad&quot; condition that is not frequent enough to be of severity Sev::S_TRACE.</div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_ae4dc52186797094b3040379ff19124c9"><div class="ttname"><a href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">flow::util::String_view</a></div><div class="ttdeci">Basic_string_view&lt; char &gt; String_view</div><div class="ttdoc">Commonly used char-based Basic_string_view. See its doc header.</div><div class="ttdef"><b>Definition:</b> <a href="string__view_8hpp_source.html#l00191">string_view.hpp:191</a></div></div>
<div class="ttc" id="astructflow_1_1log_1_1Config_1_1Component__config_html"><div class="ttname"><a href="structflow_1_1log_1_1Config_1_1Component__config.html">flow::log::Config::Component_config</a></div><div class="ttdoc">The set of config stored for each distinct (as determined by Component::payload_type(),...</div><div class="ttdef"><b>Definition:</b> <a href="config_8hpp_source.html#l00805">config.hpp:806</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
